package com.base.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.base.model.User;
import com.base.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author:sjb
 * @CreateTime:2024-08-29
 * @Description: 用户相关视图层
 * @Version：1.0
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired(required = true)
    private UserService userService;

    @GetMapping("/getUserInfo")
    public User getUserInfo() {
        QueryWrapper<User> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("id","0001cbd701054a548dd951caf81e33f1");
        return userService.getOne(queryWrapper);
    }
}
